package com.zijidelu.luframework.utils.persistence.mybatisplus;

import com.baomidou.mybatisplus.core.toolkit.LambdaUtils;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import org.apache.commons.lang3.StringUtils;

/**
 * Mbp工具类。
 *
 * @author ZIJIDELU
 * @date 2024/5/1 20:47
 */
public class MybatisPlusCommonUtil {
    public static <T> String getFieldName(final SFunction<T, ?> sFunction) {
        return StringUtils.uncapitalize(LambdaUtils.extract(sFunction).getImplMethodName().substring(3));
    }
}
